Advanced Natural Language Processing with TensorFlow 2 by Ashish Bansal

Advanced Natural Language Processing with TensorFlow 2 by Ashish Bansal

Author:Ashish Bansal
Language: eng
Format: epub
Publisher: Packt
Published: 2021-02-01T07:43:29+00:00


Note that the embedding layer does not use masking because, in text generation, we are not passing an entire sequence but only part of a sequence that needs to be completed. Now that the model is defined, the weights for the layers can be loaded in from the checkpoint. Please remember to replace the checkpoint directory with your local directory containing the checkpoints from training:

checkpoint_dir = './training_checkpoints/<YOUR-CHECKPOINT-DIR>' gen_model.load_weights(tf.train.latest_checkpoint(checkpoint_dir)) gen_model.build(tf.TensorShape([1, None]))



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.